rofiles-fuse: Fix permission comparison
authorAlexander Larsson <alexl@redhat.com>
Tue, 15 Mar 2016 12:18:35 +0000 (13:18 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 16 Mar 2016 15:30:53 +0000 (16:30 +0100)
We want to allow write if the devinode is in the set,
not the other way around.

https://bugzilla.gnome.org/show_bug.cgi?id=763676

src/rofiles-fuse/main.c

index 0b0e6a372e1496f738f7163b9367a2383cac1e9e..bdf7ffb830448ac4e767e1c7f56cc7b42fc2a1f6 100644 (file)
@@ -261,7 +261,7 @@ can_write (const char *path)
       else
        return -errno;
     }
-  if (devino_set_contains (stbuf.st_dev, stbuf.st_ino))
+  if (!devino_set_contains (stbuf.st_dev, stbuf.st_ino))
     return -EROFS;
   return 0;
 }